<?php
require_once("includes/prepend.php");
require_once("includes/lifesubnav.php");
$ownerId = $page->ownerId;
$userId =$page->userId;
$events = $page->events;
$creatorEvents = $events[0];
$partonEvents = $events[1];
?>
<script src="js/event.js" type="text/javascript"></script>
<div id="maincontent"><!--start maincontent-->
	<div id="fixposition"></div>
	 <div id="events">
	 	<div id="eventCreate">
	 		<img style="width:15px;height:15px;" src="style/add.jpg"><span id="eventCreateButton">创建事件</span>
	 	</div>
	 	<div id='dynamicEventCreate'>
	 		<div id="eventCloseDiv"><img src="style/window_close.png" /></div>
	 		
	 		<div id="dynamicEventCreateContent">
		 		事件名称：<input type="text" id="eventName" /><br />
		 		事件描述：<br /><textarea id="eventDescription" name="eventDescription"></textarea><br />
		 		开始时间：<input type="text" id="eventStartDate" class="date_input"/><br />
		 		
		 		结束时间：<input type="text" id="eventEndDate" class="date_input"/><br />
		 		<input type="button" value="创建" id="createEventDo" /><br />
	 		</div>
	 	</div>
	 	<div class="eventIterms">
	 	  <h4>我创建的事件</h4>	
	 	  <div></div>
	 	<?php
	 		if(!empty($creatorEvents)){
	 			foreach ($creatorEvents as $event){
	 				echo "<div id='eventnumber_$event[id]' style='float:left;margin-left:10px;width:20px;overflow:hidden;font-size:18px;font-weight:bolder;color:purple;margin-right:-5px;margin-top:-3px;'>$event[id]</div>";
	 				echo "<div class='eventIterm' id='eventId_$event[id]'>";
	 				echo "<div class='eventName'><a onclick=\"getEventDetail('$event[id]',this)\">$event[name]</a></div>";
	 				echo "<div class='eventDescription'>描述：$event[description]</div>";
	 				echo "<div class='eventCreatD'>创建日期：$event[createDate]</div>";
	 				echo "<div class='eventStartD'>开始日期：$event[startDate]</div>";
	 				echo "<div class='eventEndD'>结束日期：$event[endDate]</div>";
	 				echo "</div>";
	 			}
	 		}else{
	 			echo "<div id='eventNone'>您还没创建事件！</div>";
	 		}
	 		if (!empty($partonEvents)){
	 			echo "<h4>我参与的事件</h4>";
	 			foreach ($partonEvents as $event){
	 				echo "<div class='eventIterm'>$event[name]</div>";
	 			}
	 		}
	 	?>
	 	</div>
	 </div>
</div><!--end maincontent--->
<?php 
require_once("includes/pagefoot.php");
?>
<style type="text/css">
@import "uploadify/uploadify.css";
</style>
<script type="text/javascript" src="uploadify/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="uploadify/swfobject.js"></script>
<script type="text/javascript" src="uploadify/jquery.uploadify.v2.1.4.min.js"></script>
<script>
 

</script>